﻿@model ProjectTracker.Library.Admin.RoleEditList

@{
    ViewBag.Title = "Edit Roles";
}

<h2>@ViewBag.Title</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Roles</legend>

        <table>
        <thead>
          <tr><td><b>Id</b></td><td><b>Name</b></td>
        </tr></thead>
        <tbody>
        @for (int i = 0; i < Model.Count; i++)
        {
          <tr><td>@Html.DisplayTextFor(r => Model[i].Id)</td><td>@Html.TextBoxFor(r => Model[i].Name)</td></tr>
        }
        </tbody>
        </table>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
